{% extends "base.html" %}

<body>
{% block header %}
{% include "strategy-menu.html" %}
{% endblock %}

{% block content %}
<div class="wrap">
	{% include "tree.html" %}
	<div class="wrap_left right">
		<div class="shenqing1">
        	<h5 style="float:left;width:96%;margin-bottom:10px;">策略列表</h5><a href="/strategy/add/" class="new_zeng" >新增策略</a>
		</div>
		<div class="biaoge">
		<table width="100%"  border="0" cellpadding="0" cellspacing="0" class="table2">
	        <tr>
		        <th width="5%">ID</th>
		        <th width="20%">策略名</th>
		        <th width="10%">模版</th>
		        <th width="15%">范围</th>
		        <th width="25%">描述</th>
		        <th width="15%">操作</th>
	        </tr>
	        {% for s in strategy %}
			<tr class="{% cycle 'g1' 'g2' %}" class="g1">
		        <td class="td_left"><span class="first style1">{{ forloop.counter }}</span></td>
		        <td class="td_mid">{{ s.name }}</td>
		        <td>{{ s.tpl }}</td>
		        <td>{{ s.value }}</td>
		        <td>{{ s.detail }}</td>
		        <td>
			        <a href="/strategy/edit/?id={{ s.id }}">
			        	<img src="/static/img/edit-icon.gif" alt="edit" width="16" height="16" border="0" />
			        </a>
			        <a href="/strategy/delete/?id={{ s.id }}">
				        <img src="/static/img/hr.gif" width="16" height="16" alt="" onclick="if(confirm('确定删除本组么？')){}else{return false;};"/>
			        </a>
		        </td>
	        </tr>
	        {% endfor %}
		</table>
	    <div class="page_w">
			<div class="page_font">总共{{count}}条记录</div>
			<div class="page_r">
			    <ul>
				    <li>
					    <select class="frist" onchange="javascript:window.location.href=this.options[this.selectedIndex].value;">
					    {% for p in page_list %}
					    	<option value="/strategy?page={{p}}">第{{p}}页</option>
					    {% endfor %}
					    </select>
				    </li>
				    <li>每页{{num}}条,共{{page_num}}页</li>  
				    <li><a href="/strategy?page={{page_num}}" class="page_btn" onMouseDown="this.className='page_btn_d'"><span><ins>末页</ins><img src="/static/img/new/page_ico4.gif" /></span></a></li>
				    <li><a href="/strategy?page={{page_down}}" class="page_btn" onMouseDown="this.className='page_btn_d'"><span><ins>下一页</ins><img src="/static/img/new/page_ico3.gif"/></span></a></li>
				    <li><a href="/strategy?page={{page_up}}" class="page_btn" onMouseDown="this.className='page_btn_d'"><span><img src="/static/img/new/page_ico2.gif"/><ins>上一页</ins></span></a></li>
				    <li><a href="/strategy" class="page_btn" onMouseDown="this.className='page_btn_d'"><span><img src="/static/img/new/page_ico1.gif"/><ins>首页</ins></span></a></li>
			    </ul>
			</div>
		</div>
    </div>
</div>
{% endblock %}

</body>
</html>
